package SingleLinkedList;

public class TestSingleLinkedList {
    public static void main(String[] args) {

        MySingleLinkedList msl = new MySingleLinkedList();
        System.out.println("=====创建=====");
        msl.creatNode();
        msl.display();

        System.out.println("=====长度=====");
        System.out.println(msl.size());

        System.out.println("=====头插=====");
        msl.addFirst(44);
        msl.addFirst(55);
        msl.display();

        System.out.println("=====尾插=====");
        msl.addLast(44);
        msl.addLast(55);
        msl.display();

        System.out.println("=====随便插=====");
        msl.addIndex(1,33);
        msl.display();
        msl.addIndex(4,33);
        msl.display();

        System.out.println("=====找元素=====");
        System.out.println(msl.contain(44));
        System.out.println(msl.contain(11));

        System.out.println("=====删一个元素=====");
        msl.display();
        msl.remove(44);
        msl.display();
        msl.remove(44);
        msl.display();

        System.out.println("=====删所有出现的元素=====");
        msl.display();
        msl.removeAll(55);
        msl.display();
        msl.removeAll(33);
        msl.display();
    }
}
